package jy.util;

import java.util.Date;

import jy.model.Tdemand;
import jy.model.Tfixed;

import org.springframework.stereotype.Service;

@Service
public class ComputeUtil {






	public static float Interest(Tfixed tf, float value, float rate) {

		return value
				* (rate / 360 * DateUtil.GetDiffDays(
						tf.getStime(), new Date()));
	}

	public static float Interest(Tdemand td, float rate) {
		return td.getTamount() * rate / 360;
	}

}
